{layout name="public/layout" /}
        {include file='yxnavbar'}

<div class="main">
    <ul class="nav nav-tabs">
        <li class="active"><a href="{php echo createWebUrl('giftgroup');}">选择礼品/商家-分组管理</a></li>
        <li><a href="{php echo createWebUrl('addgiftgroup');}">添加分组</a></li>
    </ul> 
  <div class="panel panel-default">
        <div class="panel-body table-responsive">
            <table class="table table-hover">
                <thead class="navbar-inner">
                    <tr>
                        <th style="width:80px;">序号</th>
                        <th style="width:90px;">分组名称</th>
                        <th style="width:90px;">管理</th>
                        
                        <th style="width:120px; text-align:right;">操作</th>
                    </tr>
                </thead>
                <tbody>
                    {loop $list $item}
                  <tr> 
                    <td>{$item['id']}</td>
                    <td>{$item['groupname']}</td>
                    <td><a class="btn btn-success btn-sm" href="{php echo createWebUrl('gift', array('giftgroupid' =>$item['id']));}" title="商品管理"><i class="icon-edit"></i>分组明细</a>
                    </td>
                    
	                <td style="text-align:right;">
	                  <a class="btn btn-success btn-sm" href="{php echo createWebUrl('addgiftgroup', array('giftgroupid' =>$item['id']));}" title="编辑"><i class="icon-edit"></i>编辑分组</a>
	                  <a class="btn btn-default btn-sm" href="#" onclick="drop_confirm('您确定要删除吗?', '{php echo createWebUrl('addgiftgroup',array('op'=>'delete', 'giftgroupid' =>$item['id']));}');" title="删除"><i class="icon-remove"></i>删除</a>
                    </td>
                </tr>
                {/loop}
            </tbody>
            </table>
        </div>
        {$pager}
    </div>
    </div>

<script type="text/javascript">
    function drop_confirm(msg, url){
        if(confirm(msg)){
            window.location = url;
        }
    }
</script>
